package com.zlz.open.ugs.adaptor.source;

import com.zlz.open.ugs.common.config.entity.runtime.UgsServe;
import com.zlz.open.ugs.common.config.entity.runtime.UgsUrl;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: zhulinzhong
 * @Date: 2024/5/21
 */
@Component
public class UgsSourceLoader implements SourceLoader {

    private final SourceLoaderAdaptor adaptor;

    public UgsSourceLoader(SourceLoaderAdaptor adaptor) {
        this.adaptor = adaptor;
    }

    public UgsUrl loadUrl(String url){
        return adaptor.getUrl(url);
    }

    @Override
    public List<UgsServe> loadServe() {
        return adaptor.getServes();
    }

}
